<template>

  <view class="box">
    <view class="box-cell">
      <u-cell-group :border="false">
        <u-cell :border="false" v-for="item in nub" :key="item" :title="point+(item+1)+'号楼'" :name="(item+1)+'号楼'"
          isLink @click="goRoom"></u-cell>
      </u-cell-group>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        nub: Math.floor(Math.random() * 4 + 3)
      }
    },
    computed: {
      point() {
        return this.$store.state.house.point
      },
    },
    onLoad(value) {
      console.log(value.id)
      this.name = value.id

    },
    methods: {
      goRoom({
        name
      }) {
        // console.log(name)
        this.$store.commit('house/setBuilding', name)
        uni.navigateTo({
          url: '/pkg-house/choose-room/choose-room'
        })
      }

    }
  }
</script>

<style scoped lang="scss">
  .box {
    height: 100%;
    background-color: #FAFAFA;

    .box-cell {
      background: #ffffff;
    }

    ::v-deep .u-cell__body {
      background: #ffffff;
      height: 102rpx;
      // padding: 0;
      // margin: 0 15px;
      border-bottom: 1px solid #FAFAFA;

    }

  }
</style>
